package com.Rubbish;

import java.util.*;

public class main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int num = sc.nextInt();

        List<Rubbish> rubbishes = new ArrayList<>();

        int[] grade = new int[5];

        for (int i = 0; i < num; i++) {
            int x = sc.nextInt();
            int y = sc.nextInt();
            Rubbish rub = new Rubbish(x,y);
            rubbishes.add(rub);
        }

        System.out.println(rubbishes);
        for (int i = 0; i < rubbishes.size(); i++) {
            if(rubbishes.get(i).bIsStation(rubbishes)){
                int number = 0;
                for (int j = 0; j < rubbishes.size(); j++) {
                    if( Math.abs(rubbishes.get(j).x - rubbishes.get(i).x) + Math.abs(rubbishes.get(j).y - rubbishes.get(i).y) <=2){
                        number++;
                    }
                }
                switch (number){
                    case 5:
                        grade[0]++;
                        break;
                    case 6:
                        grade[1]++;
                        break;
                    case 7:
                        grade[2]++;
                        break;
                    case 8:
                        grade[3]++;
                        break;
                    case 9:
                        grade[4]++;
                        break;
                }
            }
        }
        for (int i : grade) {
            System.out.println(i);
        }
    }
}
